package com.jiazhong.shixi.diancan_xitong.mapper;

import com.jiazhong.shixi.diancan_xitong.bean.Customer;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface CustomerMapper {
    @Select("select * from `customer` where `id`=#{id} and `cus_password`=md5(#{cus_password})")
    Customer login(Customer customer);
    @Insert("insert into `customer` values(#{id},#{cus_name},#{cus_phone},md5(#{cus_password}),#{cus_gender})")
    int add(Customer customer);
}
